<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改商品基本信息')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-goods-edit" th:object="${minigoods}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">商品编号：</label>
            <div class="col-sm-8">
                <input name="goodsSn" th:field="*{goodsSn}" class="form-control"
                       type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">商品名称 ：</label>
            <div class="col-sm-8">
                <input name="name" th:field="*{name}" class="form-control"
                       type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">所属类目ID ：</label>
            <div class="col-sm-8">
                <input name="categoryId" th:field="*{categoryId}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">品牌id ：</label>
            <div class="col-sm-8">
                <input name="brandId" th:field="*{brandId}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">宣传图 ：</label>
            <div class="col-sm-8">
                <textarea name="gallery" class="form-control">[[*{gallery}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">商品简介 ：</label>
            <div class="col-sm-8">
                <input name="brief" th:field="*{brief}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否上架 ：</label>
            <div class="col-sm-8">
                <input name="isOnSale" th:field="*{isOnSale}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">排序 ：</label>
            <div class="col-sm-8">
                <input name="sortOrder" th:field="*{sortOrder}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">商品图片 ：</label>
            <div class="col-sm-8">
                <input name="picUrl" th:field="*{picUrl}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否新品首发：</label>
            <div class="col-sm-8">
                <input name="isNew" th:field="*{isNew}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否人气推荐：</label>
            <div class="col-sm-8">
                <input name="isHot" th:field="*{isHot}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">单位 ：</label>
            <div class="col-sm-8">
                <input name="unit" th:field="*{unit}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">专柜价格：</label>
            <div class="col-sm-8">
                <input name="counterPrice" th:field="*{counterPrice}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">零售价格
                ：</label>
            <div class="col-sm-8">
                <input name="retailPrice" th:field="*{retailPrice}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">详细介绍
                ：</label>
            <div class="col-sm-8">
                <textarea name="detail" class="form-control">[[*{detail}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">浏览量
                ：</label>
            <div class="col-sm-8">
                <input name="browse" th:field="*{browse}" class="form-control"
                       type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">已销售总量
                ：</label>
            <div class="col-sm-8">
                <input name="sales" th:field="*{sales}" class="form-control"
                       type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态
                ：</label>
            <div class="col-sm-8">
                <input name="deleted" th:field="*{deleted}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">供货单位
                ：</label>
            <div class="col-sm-8">
                <input name="commpany" th:field="*{commpany}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">批发价格
                ：</label>
            <div class="col-sm-8">
                <input name="wholesalePrice" th:field="*{wholesalePrice}" class="form-control"
                       type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
        var prefix = ctx + "mini/goods";
        $("#form-goods-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-goods-edit').serialize());
            }
        }



</script>
</body>
</html>